home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln0786.arc
/
PILOT2.LTG
< prev
next >
Wrap
Text File
|
1986-04-28
|
640b
|
28 lines
Listing #2
The Main Routine
main(argc, argv)
int argc;
char *argv[];
{
char line[SLEN]; /* input buffer for reading file */
if (argc == 3)
debug++;
else if (argc != 2)
exit(printf("Usage: %s [-d] <filename>\n", argv[0]));
init(argv[argc-1]); /* open file and such */
while (fgets(line, SLEN, fileid) != NULL) {
remove_return(line);
current_line++;
if (debug) printf(" %2d > %s\n", current_line, line);
if (strlen(line) > 0) parse(line);
}
wrapup(); /* close file and such */
}